package com.yxinsur.imc.business.events.publisher;

import com.yxinsur.imc.business.domain.ImcTeam;
import com.yxinsur.imc.business.events.event.TeamCreateEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

/**
 * 团队信息录入发布类
 */
@Component
public class TeamCreateEventPublisher {
    @Autowired
    private ApplicationContext applicationContext;

    public void pushlish(String msg, ImcTeam team){
        applicationContext.publishEvent(new TeamCreateEvent(this, msg,team));
    }
}
